<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<p:dataTable id="dataRequisicao" value="#{requisicaoBean.listaRequisicao}"
	var="pesRequisicao" paginator="true" rows="6" lazy="true">

	<p:column headerText="Codigo">
		<h:outputText value="#{pesRequisicao.idRequisicao}" />
	</p:column>

	<p:column headerText="Descrição do produto">
		<h:outputText value="#{pesRequisicao.descricao}"/>
	</p:column>
	
	<p:column headerText="Data Requisição">
		<h:outputText value="#{pesRequisicao.dataReq}">
		 <f:convertDateTime pattern="dd/MM/YYYY"/>
		</h:outputText>
	</p:column>

	<p:column headerText="Selecionar">
		<p:commandLink id="linkReq" value="Selecionar"
			action="#{requisicaoBean.findRequisicao}" ajax="frmReq" update="cadastroRequisicao">
			<f:setPropertyActionListener value="#{pesRequisicao.idRequisicao}"
				target="#{requisicaoBean.idRequisicao}" />
		</p:commandLink>
	</p:column>

</p:dataTable>
</html>
